<?php

namespace app\model;

class AdminModel extends BaseModel
{
    protected $table = 'admin';

    public $pk = 'id';


    public function getAdminListPage($page,$pageSize,$condition=[],$is_count = false,$order=''){
        $condition['admin.deleted'] = self::DELETED;
        $join=[
        ];
        $this->alias('admin')
            ->field('admin.*')
            ->join($join);
        if($condition){
            $this->where($condition);
        }
        if($order){
            $this->order($order);
        }
        if($is_count){
            return $this->count();
        }
        return $this->page($page,$pageSize)->select();
    }


}